package com.android.isa;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class IisApkTestActivity extends Activity {
	private Button bt;
	private TextView tv;
	private EditText et;
	Handler nh=new Handler();
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		creat();
	}

	private void creat() {
		bt = (Button) findViewById(R.id.button1);
		tv = (TextView) findViewById(R.id.textView1);
		et = (EditText) findViewById(R.id.editText1);
		bt.setOnClickListener(new ADDClickListener());
	}
	public void print(String str){
	final	String buf=str+"\n"+tv.getText().toString();
	 nh.post(new Thread() {
		public void run() {

			tv.setText(buf);
		}
	});
		
		
	}

	class ADDClickListener implements OnClickListener {

		public void onClick(View arg0) {
			RootSystemManager rs = new RootSystemManager(getPackageCodePath(), IisApkTestActivity.this);
			rs.downFile(et.getText()
					.toString());
		}

	}
}